var valColorError="#FEFEDE";var __buttonSubmit__;var __newWidth__;var __buttonSubmitSrc__;var __cAlert__;var __lang__;var __cAlertDiv__;var __cAlertTxt__;var __oldFocus__;var __cAlertShow__=true;function frmValidator(frmname,lang){this.formobj=document.forms[frmname];if(!this.formobj){alert('BUG:Não foi possívem acessar o formulário:'+frmname);return;};if(this.formobj.onsubmit){this.formobj.old_onsubmit=this.formobj.onsubmit;this.formobj.onsubmit=null;}else{this.formobj.old_onsubmit=null;};this.formobj.onsubmit=form_submit_handler;this.lang=__lang__=lang;this.cAlert=customAlert;this.av=add_validation;this.cSubmit=change_submit;this.amv=addMultiVal;this.customValidation=set_addnl_vfunction;this.clearAllValidations=clear_all_validations;this.formobj.onreset=rABgColor;};function set_addnl_vfunction(functionname){this.formobj.addnlvalidation=functionname;};function clear_all_validations(){for(var itr=0;itr<this.formobj.elements.length;itr++ ){this.formobj.elements[itr].validationset=null;};};function customAlert(d,t,s){if(!gElm(d)||!gElm(t)){alert('BUG:Box id not defined or Text id not defined.');return false;}else{__cAlert__=true;__cAlertDiv__=d;__cAlertTxt__=t;__cAlertShow__=s;}};function form_submit_handler(){for(var itr=0;itr<this.elements.length;itr++ ){if(this.elements[itr].validationset&&!this.elements[itr].validationset.validate()){return false;};};if(this.addnlvalidation){str=' var ret='+this.addnlvalidation+'()';eval(str);if(!ret) return ret;};if(__buttonSubmit__){if (__lang__=='en'){stButton='Sending...';}else if(__lang__=='es'){stButton='Enviando...';}else{stButton='Enviando...';}__buttonSubmit__.title=stButton;if(__buttonSubmitSrc__){__buttonSubmit__.src=__buttonSubmitSrc__;}else{__buttonSubmit__.value=stButton;}__buttonSubmit__.disabled='disabled';__buttonSubmit__.style.cursor='wait';if(__newWidth__){__buttonSubmit__.style.width=__newWidth__};}return true;};function add_validation(itemname,descriptor,errstr){if(!this.formobj){alert('BUG:Formulário não definido corretamente!');return;};var itemobj=this.formobj[itemname];if (!itemobj) alert('BUG:Não foi possível encontrar nehum campo com o name='+itemname);if(itemobj.length&&isNaN(itemobj.selectedIndex) ){itemobj=itemobj[0];};if(!itemobj){alert('BUG:Não foi possível encontrar o campo com o nome:'+itemname);return;};if(!itemobj.validationset){itemobj.validationset=new ValidationSet(itemobj);};itemobj.validationset.add(descriptor,errstr);};function change_submit(bt,newWidth,buttonSubmitSrc){if(!this.formobj){alert('BUG:Formulário não definido corretamente!');return;};__buttonSubmit__=gElm(bt);__newWidth__=newWidth;__buttonSubmitSrc__=buttonSubmitSrc;};function ValidationDesc(inputitem,desc,error){this.desc=desc;this.error=error;this.itemobj=inputitem;this.validate=vdesc_validate;};function vdesc_validate(){if(!validateInput(this.desc,this.itemobj,this.error)){if(!__cAlert__) this.itemobj.focus();return false;};return true;};function ValidationSet(inputitem){this.vSet=new Array();this.add=add_validationdesc;this.validate=vset_validate;this.itemobj=inputitem;};function add_validationdesc(desc,error){this.vSet[this.vSet.length]=new ValidationDesc(this.itemobj,desc,error);};function vset_validate(){for(var itr=0;itr<this.vSet.length;itr++ ){if(!this.vSet[itr].validate()){return false;};};return true;};function validateEmail(email){if (email.length<=0){return true;};var splitted=email.match('^(.+)@(.+)$');if (splitted==null)return false;if (splitted[1]!=null ){var regexp_user=/^\"?[\w-_\.]*\"?$/;if (splitted[1].match(regexp_user)==null)return false;};if (splitted[2]!=null){var regexp_domain=/^[\w-\.]*\.[A-Za-z]{2,4}$/;if (splitted[2].match(regexp_domain)==null){var regexp_ip=/^\[\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\]$/;if (splitted[2].match(regexp_ip)==null)return false;};return true;};return false;};function TestComparison(objValue,strCompareElement,strvalidator,strError){var bRet=true;var objCompare=null;if(!objValue.form){alert('BUG:Formulário não definido!');return false};objCompare=objValue.form.elements[strCompareElement];if(!objCompare){alert('BUG:Campo com o nome '+strCompareElement+' não encontrado!');return false;};var cmpstr='';switch(strvalidator){case 'equal':case 'eq':{if(objValue.value!=objCompare.value){if (__lang__=='en'){cmpstr=' must be the same as field \"';}else if(__lang__=='es'){cmpstr=' debe ser igual al campo \"';}else{cmpstr=' deve ser igual ao campo \"';}bRet=false;};break;};case 'notequal':case 'noteq':{if(objValue.value.length>0&&objCompare.value.length>0&&objValue.value==objCompare.value){if (__lang__=='en'){cmpstr=' must be different from field \"';}else if(__lang__=='es'){cmpstr=' debe ser diferente del campo \"';}else{cmpstr=' deve ser diferente do campo \"';}bRet=false;};break;};};if(bRet==false){if(!strError||strError.length==0){if (__lang__=='en'){strError='Field \"'+objValue.title+'\"'+cmpstr+objCompare.title+'\".';}else if(__lang__=='es'){strError='El campo \"'+objValue.title+'\"'+cmpstr+objCompare.title+'\".';}else{strError='O campo \"'+objValue.title+'\"'+cmpstr+objCompare.title+'\".';}cBgColor(objValue);};boxAlert(strError,objValue);};if(bRet) rBgColor(objValue);return bRet;};function TestSelMin(objValue,strMinSel,strError){var bret=true;var objcheck=objValue.form.elements[objValue.name];var chkcount=0;if(objcheck.length){for(var c=0;c<objcheck.length;c++ ){if(objcheck[c].checked=='1'){chkcount++;};};}else{chkcount=(objcheck.checked=='1')?1:0;};var minsel=eval(strMinSel);if(chkcount<minsel){if(!strError||strError.length==0){if (__lang__=='en'){strError='Select at least '+minsel+' option(s) for field \"'+objValue.title+'\".';}else if(__lang__=='es'){strError='Seleccione al menos '+minsel+' opciones para el campo \"'+objValue.title+'\".';}else{strError='Selecione ao menos '+minsel+' opção(ões) para o campo \"'+objValue.title+'\".';}};boxAlert(strError,objValue);bret=false;};if(bret) rBgColor(objValue);return bret;};function TestSelMax(objValue,strMaxSel,strError){var gret=true;var objcheck=objValue.form.elements[objValue.name];var chkcount=0;if(objcheck.length){for(var c=0;c<objcheck.length;c++ ){if(objcheck[c].checked=='1'){chkcount++;};};}else{chkcount=(objcheck.checked=='1')?1:0;};var maxsel=eval(strMaxSel);if(chkcount>maxsel){if(!strError||strError.length==0){if (__lang__=='en'){strError='Select at the most '+maxsel+' option(s) for field \"'+objValue.title+'\".';}else if(__lang__=='es'){strError='Seleccione como máximo '+maxsel+' opciones para el campo \"'+objValue.title+'\".';}else{strError='Selecione no máximo '+maxsel+' opção(ões) para o campo \"'+objValue.title+'\".';}};boxAlert(strError,objValue);gret=false;};if(gret) rBgColor(objValue);return gret;};function TestDontSelect(objValue,index,strError){var ret=true;if(objValue.selectedIndex==null){alert('BUG:Este comando só pode ser usado para elementos de seleção.');ret=false;}else if(objValue.selectedIndex==eval(index)){if(!strError||strError.length==0){if (__lang__=='en'){strError='Select one of the options for field \"'+objValue.title+'\".';}else if(__lang__=='es'){strError='Seleccione una de las opciones para el campo \"'+objValue.title+'\".';}else{strError='Selecione uma das opções para o campo \"'+objValue.title+'\".';}};   boxAlert(strError,objValue);ret=false;cBgColor(objValue);};if(ret) rBgColor(objValue);return ret;};function TestRequiredInput(objValue,strError){var ret=true;if(eval(objValue.value.length)==0){if(!strError||strError.length==0){if (__lang__=='en'){strError='Field \"'+objValue.title+'\" must be filled out.';}else if(__lang__=='es'){strError='El campo \"'+objValue.title+'\" es obligatorio.';}else{strError='O campo \"'+objValue.title+'\" é obrigatório.';}};boxAlert(strError,objValue);ret=false;cBgColor(objValue);};if(ret) rBgColor(objValue);return ret;};function TestMaxLen(objValue,strMaxLen,strError){var ret=true;if(eval(objValue.value.length)>eval(strMaxLen)){if(!strError||strError.length==0){if (__lang__=='en'){strError='Field \"'+objValue.title+'\" can contain up to '+strMaxLen+' character(s).';strErrorCont='Currently it has:'+objValue.value.length+' character(s).';}else if(__lang__=='es'){strError='El campo \"'+objValue.title+'\" puede contener hasta '+strMaxLen+' caracter(es).';strErrorCont='Actualmente tiene:'+objValue.value.length+' carácter(es).';}else{strError='O campo \"'+objValue.title+'\" pode conter no máximo '+strMaxLen+' caracter(es).';strErrorCont='Atualmente ele tem:'+objValue.value.length+' caracter(es).';}};cBgColor(objValue);boxAlert(strError+'\n'+strErrorCont,objValue);ret=false;};if(ret) rBgColor(objValue);return ret;};function TestMinLen(objValue,strMinLen,strError){var ret=true;if(eval(objValue.value.length)<eval(strMinLen)){if(!strError||strError.length==0){if (__lang__=='en'){strError='Field \"'+objValue.title+'\" must contain at least '+strMinLen+' character(s).';strErrorCont='Currently it has:'+objValue.value.length+' character(s).';}else if(__lang__=='es'){strError='El campo \"'+objValue.title+'\" debe contener un mínimo de '+strMinLen+' caracter(es).';strErrorCont='Actualmente tiene:'+objValue.value.length+' carácter(es).';}else{strError='O campo \"'+objValue.title+'\" deve conter no mínimo '+strMinLen+' caracter(es).';strErrorCont='Atualmente ele tem:'+objValue.value.length+' caracter(es).';}};cBgColor(objValue);boxAlert(strError+'\n'+strErrorCont,objValue);ret=false;};if(ret) rBgColor(objValue);return ret;};function TestInputType(objValue,strRegExp,strError,strDefaultError){var ret=true;var charpos=objValue.value.search(strRegExp);if(objValue.value.length>0&&charpos>=0){if(!strError||strError.length==0){strError=strDefaultError;if (__lang__=='en'){strErrorCont='Error of character in position:';}else if(__lang__=='es'){strErrorCont='Error en el carácter en la posición:';}else{strErrorCont='Erro no caracter na posição:';}};cBgColor(objValue);boxAlert(strError+'\n'+strErrorCont+eval(charpos+1)+'.',objValue);ret=false;};if(ret) rBgColor(objValue);return ret;};function TestEmail(objValue,strError){var ret=true;if(objValue.value.length>0&&!validateEmail(objValue.value) ){if(!strError||strError.length==0){if (__lang__=='en'){strError='\"'+objValue.value+'\" is not a valid e-mail for field \"'+objValue.title+'\".';}else if(__lang__=='es'){strError='\"'+objValue.value+'\" no es un e-mail válido para el campo \"'+objValue.title+'\".';}else{strError='\"'+objValue.value+'\" não é um e-mail válido para o campo \"'+objValue.title+'\".';}};boxAlert(strError,objValue);ret=false;cBgColor(objValue);};if(ret) rBgColor(objValue);return ret;};function TestRegExp(objValue,strRegExp,strError){var ret=true;if( objValue.value.length>0&&!objValue.value.match(strRegExp) ){if(!strError||strError.length==0){if (__lang__=='en'){strError='Invalid character found in field \"'+objValue.title+'\".';}else if(__lang__=='es'){strError='Carácter no permitido encontrado en el campo \"'+objValue.title+'\".';}else{strError='Caracter não permitido encontrado no campo \"'+objValue.title+'\".';}};boxAlert(strError,objValue);ret=false;cBgColor(objValue);};if(ret) rBgColor(objValue);return ret;};function TestSelectOneRadio(objValue,strError){var objradio=objValue.form.elements[objValue.name];if (!objradio) alert('BUG:Não foi possível encotrar nenhum radioButton no formulário.\nCertifique-se de que eles existem e que tem o atributo \"name\".');var one_selected=false;for(var r=0;r<objradio.length;r++ ){if(objradio[r].checked=='1'){one_selected=true;break;};};if(false==one_selected){if(!strError||strError.length==0){if (__lang__=='en'){strError='Select one of the options for field \"'+objValue.title+'\".';}else if(__lang__=='es'){strError='Seleccione una de las opciones para el campo \"'+objValue.title+'\".';}else{strError='Selecione uma das opções para o campo \"'+objValue.title+'\".';}};boxAlert(strError,objValue);};return one_selected;};function TestCpf(v){if (v=="00000000000"||v=="11111111111"||v=="22222222222"||v=="33333333333"||v=="44444444444"||v=="55555555555"||v=="66666666666"||v=="77777777777"||v=="88888888888"||v=="99999999999") return false;if(!v) return true;var s=null;var r=null;if(v.length!=11||v.match(/1{11};|2{11};|3{11};|4{11};|5{11};|6{11};|7{11};|8{11};|9{11};|0{11};/)) return false;s=0;for(var i=0;i<9;i++ ) s+=parseInt(v.charAt(i))*(10-i);r=11-(s%11);if(r==10||r==11) r=0;if(r!=parseInt(v.charAt(9))) return false;s=0;for(var i=0;i<10;i++ ) s+=parseInt(v.charAt(i))*(11-i);r=11-(s%11);if(r==10||r==11) r=0;if(r!=parseInt(v.charAt(10))) return false;return true;};function TestCnpj(v){if(!v) return true;var m=new Array('543298765432','6543298765432');var d=new Array(0,0);for (var t=0;t<2;t++ ){for(x=0;x<13;x++ ){if ((t==0&&x!=12)||t==1) d[t]+=( parseInt(v.slice(x,x+1)) * parseInt(m[t].slice(x,x+1)) );};d[t]=(d[t] * 10) % 11;if (d[t]==10) d[t]=0;};return (d[0]==parseInt(v.slice(12,13))&&d[1]==parseInt(v.slice(13,14)));};function TestFile(v,ext){if(!v) return true;var e=ext.split(",");for(var i=0;i<e.length;i++ ){if (v.substr(v.lastIndexOf('.')+1)==e[i]) return true;};return false;};function replaceAll(str,replacements ){for ( i=0;i<replacements.length;i++ ){var idx=str.indexOf( replacements[i][0] );while ( idx>-1 ){str=str.replace( replacements[i][0],replacements[i][1] );idx=str.indexOf( replacements[i][0] );};};return str;};function addMultiVal(){var arrPar=[];for(var i=0;i<arguments.length;i++ ){arrPar[i]=arguments[i];};var fld=arrPar[0];arrPar=arrPar.slice(1,arrPar.length);for (var a=0;a<arrPar.length;a++ ){this.av(fld,arrPar[a]);};delete arrPar,fld;};function validateInput(strValidateStr,objValue,strError){var ret=true;var epos=strValidateStr.search('=');var command='';var cmdvalue='';if(epos>=0){command=strValidateStr.substring(0,epos);cmdvalue=strValidateStr.substr(epos+1);}else{command=strValidateStr;};switch(command){case 'req':case 'required':{ret=TestRequiredInput(objValue,strError);break;};case 'maxlength':case 'maxlen':{ret=TestMaxLen(objValue,cmdvalue,strError);break;};case 'minlength':case 'minlen':{ret=TestMinLen(objValue,cmdvalue,strError);break;};case 'alnum':case 'alphanumeric':{if (__lang__=='en'){strTxtError='Only alphanumeric characters (letters and numbers) are valid for field';}else if(__lang__=='es'){strTxtError='Sólo caracteres alfanuméricos (letras y números) son permitidos para el campo';}else{strTxtError='Apenas caracteres alfanuméricos(letras e números) são permitidos para o campo';}ret=TestInputType(objValue,'[^A-Za-z0-9áàãâäéèêëíìîïóòõôöúùûüçÁÀÃÂÄÉÈÊËÍÌÎÏÓÒÕÔÖÚÙÛÜÇ\\s]',strError,strTxtError+' \"'+objValue.title+'\".');break;};case 'num':case 'number':case 'numeric':{if (__lang__=='en'){strTxtError='Only numeric characters (numbers) are valid for field';}else if(__lang__=='es'){strTxtError='Sólo caracteres numéricos (números) son permitidos para el campo';}else{strTxtError='Apenas caracteres numéricos(números) são permitidos para o campo';}ret=TestInputType(objValue,'[^0-9]',strError,strTxtError+' \"'+objValue.title+'\".');break;};case 'letters':case 'let':{if (__lang__=='en'){strTxtError='Only letters are valid for field';}else if(__lang__=='es'){strTxtError='Sólo letras son permitidas para el campo';}else{strTxtError='Apenas letras são permitidas para o campo';}ret=TestInputType(objValue,'[^A-Za-záàãâäéèêëíìîïóòõôöúùûüçÁÀÃÂÄÉÈÊËÍÌÎÏÓÒÕÔÖÚÙÛÜÇ\\s]',strError,strTxtError+' \"'+objValue.title+'\".');break;};case 'restrict':case 'rest':{if (__lang__=='en'){strTxtError='Only letters,numbers,\"-\" and \"_\" are valid for field';}else if(__lang__=='es'){strTxtError='Sólo letras,números,\"-\" y \"_\" son permitidos para el campo';}else{strTxtError='Apenas letras,números,\"-\" e \"_\" são permitidas para o campo';}ret=TestInputType(objValue,'[^A-Za-z0-9-_]',strError,strTxtError+' \"'+objValue.title+'\".');break;};case 'email':{ret=TestEmail(objValue,strError);break;};case "lt":case "lessthan":{if (isNaN(objValue.value)){if (__lang__=='en'){strTxtError='Only numeric characters (numbers) are valid for field';}else if(__lang__=='es'){strTxtError='Sólo caracteres numéricos (números) son permitidos para el campo';}else{strTxtError='Apenas caracteres numéricos(números) são permitidos para o campo';}boxAlert(strTxtError+' \"'+objValue.title+'\".',objValue);cBgColor(objValue);return false;};if (eval(objValue.value)>eval(cmdvalue)){if (!strError||strError.length==0){if (__lang__=='en'){strError='Field \"'+objValue.title+'\" must be smaller or equal than:'+cmdvalue+'.';}else if(__lang__=='es'){strError='El campo \"'+objValue.title+'\" debe ser menor o igual a:'+cmdvalue+'.';}else{strError='O campo \"'+objValue.title+'\" deve ser menor ou igual a:'+cmdvalue+'.';}};boxAlert(strError,objValue);cBgColor(objValue);return false;};break;};case "gt":case "greaterthan":{if (isNaN(objValue.value)){if (__lang__=='en'){strTxtError='Only numeric characters (numbers) are valid for field';}else if(__lang__=='es'){strTxtError='Sólo caracteres numéricos (números) son permitidos para el campo';}else{strTxtError='Apenas caracteres numéricos(números) são permitidos para o campo';}boxAlert(strTxtError+' \"'+objValue.title+'\".',objValue);cBgColor(objValue);return false;};if (eval(objValue.value)<eval(cmdvalue)){if (!strError||strError.length==0){if (__lang__=='en'){strError='Field \"'+objValue.title+'\" must be bigger or equal than:'+cmdvalue+'.';}else if(__lang__=='es'){strError='El campo \"'+objValue.title+'\" debe ser mayor o igual a:'+cmdvalue+'.';}else{strError='O campo \"'+objValue.title+'\" deve ser maior ou igual a:'+cmdvalue+'.';}};boxAlert(strError,objValue);cBgColor(objValue);return false;};break;};case 'regex':{ret=TestRegExp(objValue,cmdvalue,strError);break;};case 'dontselect':{ret=TestDontSelect(objValue,cmdvalue,strError);break;};case 'selmin':{ret=TestSelMin(objValue,cmdvalue,strError);break;};case 'selmax':{ret=TestSelMax(objValue,cmdvalue,strError);break;};case 'selone':{ret=TestSelectOneRadio(objValue,strError);break;};case 'equal':case 'eq':case 'notequal':case 'noteq':{return TestComparison(objValue,cmdvalue,command,strError);break;};case 'cpf':{var tmpValue=replaceAll(objValue.value,[['.',''],[ '/','' ],['-',''],[' ','']]);ret=TestCpf(tmpValue);if(!ret){if (__lang__=='en'){strErrorTxt='is not a valid CPF number for field';}else if(__lang__=='es'){strErrorTxt='no es un número de CPF válido para el campo';}else{strErrorTxt='não é um número de CPF válido para o campo';}boxAlert('\"'+objValue.value+'\" '+strErrorTxt+' \"'+objValue.title+'\".',objValue);cBgColor(objValue);}else rBgColor(objValue);delete tmpValue;break;};case 'cnpj':{var tmpValue=replaceAll(objValue.value,[['.',''],[ '/','' ],['-',''],[' ','']]);ret=TestCnpj(tmpValue);if(!ret){if (__lang__=='en'){strErrorTxt='is not a valid CNPJ number for field';}else if(__lang__=='es'){strErrorTxt='no es un número de CNPJ válido para el campo';}else{strErrorTxt='não é um número de CNPJ válido para o campo';}boxAlert('\"'+objValue.value+'\" '+strErrorTxt+' \"'+objValue.title+'\".',objValue);cBgColor(objValue);}else rBgColor(objValue);delete tmpValue;break;};case 'file':{ret=TestFile(objValue.value.toLowerCase(),cmdvalue);if(!ret){if (__lang__=='en'){boxAlert('Field \"'+objValue.title+'\" allows only \".'+cmdvalue+' \"archives.',objValue);}else if(__lang__=='es'){boxAlert('El campo \"'+objValue.title+'\" permite sólo archivos con la extensión \".'+cmdvalue+' \".',objValue);}else{boxAlert('O campo \"'+objValue.title+'\" permite somente arquivos com a extensão \".'+cmdvalue+' \".',objValue);}cBgColor(objValue);}else rBgColor(objValue);delete tmpValue;break;};};if(ret) rBgColor(objValue);return ret;};function cBgColor(o){o.style.backgroundColor=valColorError;};function rBgColor(o){o.style.backgroundColor="";};function rABgColor(){for (var itr=0;itr<this.elements.length;itr++ ){rBgColor(this.elements[itr]);};};function only(t,o,e){if(window.event)key=window.event.keyCode;else if(e)key=e.which;else return true;S=(o)?o:'';if(t=='num'||t=='number'||t=='numeric')S+='0123456789';if(t=='alnum'||t=='alphanumeric')S+='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZáàãâäéèêëíìîïóòõôöúùûüçÁÀÃÂÄÉÈÊËÍÌÎÏÓÒÕÔÖÚÙÛÜÇ 0123456789';if(t=='let'||t=='letters')S+='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZáàãâäéèêëíìîïóòõôöúùûüçÁÀÃÂÄÉÈÊËÍÌÎÏÓÒÕÔÖÚÙÛÜÇ ';if(t=='rest'||t=='restrict')S+='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';if(t=='email')S+='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@-_.';if(key==null||key==0||key==8||key==9||key==13||key==27)return true;else if(S.indexOf(String.fromCharCode(key))!=-1)return true;else return false;};function not(S,e){if(window.event)key=window.event.keyCode;else if(e)key=e.which;else return true;if(!S)return false;else if(key==null||key==0||key==8||key==9||key==13||key==27)return true;else if(S.indexOf(String.fromCharCode(key))!=-1)return false;else return true;};function jump(o,e){if(window.event)key=window.event.keyCode;else if(e)key=e.which;else return true;if (key==9||key==2||key==16) return false;if(o.value.length==o.maxLength){for(var i=0;i<o.form.length;i++ ){if(o.form[i]==o&&o.form[i+1]){if(o.form[i+1]) o.form[i+1].focus();break;};}};};function checkReset(f){if (__lang__=='en'){strErrorTxt='All data submitted will be deleted.\nTo delete all data click \"OK\".\nTo continue submitting information click \"Cancel\".';}else if(__lang__=='es'){strErrorTxt='Todos los datos registrados serán borrados.\nPara borrar todos los datos haga clic en \"OK\".\nPara continuar registrando haga clic en \"Cancelar\".';}else{strErrorTxt='Todos os dados preenchidos serão apagados.\nPara apagar todos os dados clique em \"OK\".\nPara continuar preenchendo clique em \"Cancelar\".';}if(confirm(strErrorTxt)) gElm(f).reset();};function clearMe(w,s){(w.value==s) ? w.value='':0;};function leaveMe(w,s){(w.value.length==0) ? w.value=s:0;};function boxAlert(x,f){if(__cAlert__){if(__cAlertShow__){openBox(__cAlertDiv__);}else{sDiv(__cAlertDiv__);f.focus();}gElm(__cAlertTxt__).innerHTML=x;__oldFocus__=f;}else{alert(x);}};function oldFocus(){__oldFocus__.focus();};;if (typeof deconcept=="undefined"){var deconcept=new Object();}if (typeof deconcept.util=="undefined"){deconcept.util=new Object();}if (typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil=new Object();}deconcept.SWFObject=function (_1,id,w,h,disableCache,_5,c,_7,_8,_9,_a){if (!document.getElementById){return;}if (!_5){_5="6";}if (!c){c="#FFFFFF";}this.DETECT_KEY=_a ? _a:"detectflash";this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);this.params=new Object();this.variables=new Object();this.attributes=new Array();if (_1){if (disableCache){_1+='?$_dt='+new Date().getTime();}this.setAttribute("swf",_1);}if (id){this.setAttribute("id",id);}if (w){this.setAttribute("width",w);}if (h){this.setAttribute("height",h);}if (_5){this.setAttribute("version",new deconcept.PlayerVersion(_5.toString().split(".")));}this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();if (!window.opera&&document.all&&this.installedVer.major>7){deconcept.SWFObject.doPrepUnload=true;}if (c){this.addParam("bgcolor",c);}var q=_7 ? _7:"best";this.addParam("quality",q);this.setAttribute("useExpressInstall",false);this.setAttribute("doExpressInstall",false);var _c=(_8) ? _8:window.location;this.setAttribute("xiRedirectUrl",_c);this.setAttribute("redirectUrl","");if (_9){this.setAttribute("redirectUrl",_9);}};deconcept.SWFObject.prototype={useExpressInstall:function (_d){this.xiSWFPath=!_d ? "../swf/expressinstall.swf":_d;this.setAttribute("useExpressInstall",true);},setAttribute:function (_e,_f){this.attributes[_e]=_f;},getAttribute:function (_10){return this.attributes[_10];},addParam:function (_11,_12){this.params[_11]=_12;},getParams:function (){return this.params;},addVariable:function (_13,_14){this.variables[_13]=_14;},getVariable:function (_15){return this.variables[_15];},getVariables:function (){return this.variables;},getVariablePairs:function (){var _16=new Array();var key;var _18=this.getVariables();for (key in _18){_16[_16.length]=key+"="+_18[key];}return _16;},getSWFHTML:function (){var _19="";if (navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if (this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");this.setAttribute("swf",this.xiSWFPath);}_19="<embed type=\"application/x-shockwave-flash\" src=\""+this.getAttribute("swf")+"\" menu=\"false\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+this.getAttribute("style")+"\"";_19+=" id=\""+this.getAttribute("id")+"\" name=\""+this.getAttribute("id")+"\" ";var _1a=this.getParams();for (var key in _1a){_19+=[key]+"=\""+_1a[key]+"\" ";}var _1c=this.getVariablePairs().join("&");if (_1c.length>0){_19+="flashvars=\""+_1c+"\"";}_19+="/>";}else{if (this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");this.setAttribute("swf",this.xiSWFPath);}_19="<object id=\""+this.getAttribute("id")+"\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+this.getAttribute("style")+"\">";_19+="<param name=\"movie\" value=\""+this.getAttribute("swf")+"\" />";_19+="<param name=\"menu\" value=\"false\" />";var _1d=this.getParams();for (var key in _1d){_19+="<param name=\""+key+"\" value=\""+_1d[key]+"\" />";}var _1f=this.getVariablePairs().join("&");if (_1f.length>0){_19+="<param name=\"flashvars\" value=\""+_1f+"\" />";}_19+="</object>";}return _19;},write:function (_20){if (this.getAttribute("useExpressInstall")){var _21=new deconcept.PlayerVersion([6,0,65]);if (this.installedVer.versionIsValid(_21)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){if (this.getAttribute("width")<215){this.setAttribute("width",215);}if (this.getAttribute("height")<137){this.setAttribute("height",137);}this.setAttribute("doExpressInstall",true);this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));document.title=document.title.slice(0,47)+" -Flash Player Installation";this.addVariable("MMdoctitle",document.title);}}if (this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){var n=(typeof _20=="string") ? document.getElementById(_20):_20;(!n) ? document.write(this.getSWFHTML()):n.innerHTML=this.getSWFHTML();if(!(navigator.plugins&&navigator.mimeTypes.length)) window[this.getAttribute('id')]=document.getElementById(this.getAttribute('id'));return true;}else{if (this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"));}}return false;}};deconcept.SWFObjectUtil.getPlayerVersion=function (){var _23=new deconcept.PlayerVersion([0,0,0]);if (navigator.plugins&&navigator.mimeTypes.length){var x=navigator.plugins["Shockwave Flash"];if (x&&x.description){_23=new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));}}else{if (navigator.userAgent&&navigator.userAgent.indexOf("Windows CE")>=0){var axo=1;var _26=3;while (axo){try{_26++;axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+_26);_23=new deconcept.PlayerVersion([_26,0,0]);}catch (e){axo=null;}}}else{try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");}catch (e){try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");_23=new deconcept.PlayerVersion([6,0,21]);axo.AllowScriptAccess="always";}catch (e){if (_23.major==6){return _23;}}try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");}catch (e){}}if (axo!=null){_23=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));}}}return _23;};deconcept.PlayerVersion=function (_29){this.major=_29[0]!=null ? parseInt(_29[0]):0;this.minor=_29[1]!=null ? parseInt(_29[1]):0;this.rev=_29[2]!=null ? parseInt(_29[2]):0;};deconcept.PlayerVersion.prototype.versionIsValid=function (fv){if (this.major<fv.major){return false;}if (this.major>fv.major){return true;}if (this.minor<fv.minor){return false;}if (this.minor>fv.minor){return true;}if (this.rev<fv.rev){return false;}return true;};deconcept.util={getRequestParameter:function (_2b){var q=document.location.search||document.location.hash;if (_2b==null){return q;}if (q){var _2d=q.substring(1).split("&");for (var i=0;i<_2d.length;i++ ){if (_2d[i].substring(0,_2d[i].indexOf("="))==_2b){return _2d[i].substring((_2d[i].indexOf("=")+1));}}}return "";}};deconcept.SWFObjectUtil.cleanupSWFs=function (){var _2f=document.getElementsByTagName("OBJECT");for (var i=_2f.length -1;i>=0;i-- ){_2f[i].style.display="none";for (var x in _2f[i]){if (typeof _2f[i][x]=="function"){_2f[i][x]=function (){};}}}};if (deconcept.SWFObject.doPrepUnload){if (!deconcept.unloadSet){deconcept.SWFObjectUtil.prepUnload=function (){__flash_unloadHandler=function (){};__flash_savedUnloadHandler=function (){};window.attachEvent("onunload",deconcept.SWFObjectUtil.cleanupSWFs);};window.attachEvent("onbeforeunload",deconcept.SWFObjectUtil.prepUnload);deconcept.unloadSet=true;}}if (!document.getElementById&&document.all){document.getElementById=function (id){return document.all[id];};}var getQueryParamValue=deconcept.util.getRequestParameter;var FlashObject=deconcept.SWFObject;var SWFObject=deconcept.SWFObject;;